package com.moyq5.mvc.maker.test.bean.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Type;
import org.hibernate.annotations.TypeDef;

import com.moyq5.mvc.maker.test.bean.SysSettingIdUserType;
import com.moyq5.mvc.maker.test.bean.enums.SysSettingAbout;
import com.moyq5.mvc.maker.test.bean.enums.SysSettingId;

/**
 * 系统参数信息
 * @author Moyq5
 * @date 2018年5月11日
 */
@TypeDef(name = "settingId", typeClass = SysSettingIdUserType.class)
@Entity
@Table(name = "sys_setting")
@DynamicUpdate
public class SysSetting implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6051376423550641165L;
	/**
	 * 参数ID
	 */
	@Id
    @Column(name = "setting_id")
	@Type(type = "settingId")
	private SysSettingId settingId;
	/**
	 * 参数类别
	 */
    @Enumerated(EnumType.ORDINAL)
    @Column(name = "about", precision = 8, nullable = false)
	private SysSettingAbout about;
	/**
	 * 参数名称
	 */
	@Column(name = "name", length = 60, nullable = false)
	private String name;
	/**
	 * 参数值
	 */
	@Column(name = "value", length = 1000, nullable = false)
	private String value;
	/**
	 * 参数描述
	 */
	@Column(name = "descr", length = 300)
	private String descr;
	public SysSettingId getSettingId() {
		return settingId;
	}
	public void setSettingId(SysSettingId settingId) {
		this.settingId = settingId;
	}
	public SysSettingAbout getAbout() {
		return about;
	}
	public void setAbout(SysSettingAbout about) {
		this.about = about;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	public String getDescr() {
		return descr;
	}
	public void setDescr(String descr) {
		this.descr = descr;
	}
}
